import os
import pathlib

cur_dir=pathlib.Path(os.path.dirname(__file__))
raw_dir=cur_dir/'raw'
if os.path.exists(cur_dir/'output')==False:
    os.mkdir(cur_dir/'output')

sox_path=r"E:\Tools\sox\sox.exe"
for file in raw_dir.glob('*.wav'):
    print(file.name)
    cmd=f'{sox_path} {file} -b 16 -e signed-integer {cur_dir/"output"/file.name}'
    print(cmd)
    os.system(cmd)
    # break